home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / scsiDiskBoot / sun3.md / devConfig.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-13  |  2.6 KB  |  99 lines

  1. /* 
  2.  * devConfig.c --
  3.  *
  4.  *    Configuration table for the devices in the system.  There is
  5.  *    a table for the possible controllers in the system, and
  6.  *    then a table for devices.  Devices are implicitly associated
  7.  *    with a controller.  This file should be automatically generated
  8.  *    by a config program, but it isn't.
  9.  *
  10.  * Copyright 1986 Regents of the University of California
  11.  * All rights reserved.
  12.  */
  13.  
  14. #ifdef notdef
  15. static char rcsid[] = "$Header: /sprite/src/kernel/dev/sun3.md/RCS/devConfig.c,v 8.6 89/05/24 07:50:35 rab Exp $ SPRITE (Berkeley)";
  16. #endif not lint
  17.  
  18.  
  19. #include "sprite.h"
  20. #include "boot.h"
  21. #include "devInt.h"
  22. #include "devTypesInt.h"
  23. #include "fs.h"
  24.  
  25. /*
  26.  * Per device include files.
  27.  */
  28. #if defined(SCSI_DISK_BOOT) || defined(SCSI_TAPE_BOOT)
  29. #include "scsiHBA.h"
  30. #ifdef SCSI3_BOOT
  31. #include "scsi3.h"
  32. #endif
  33. #ifdef SCSI0_BOOT
  34. #include "scsi0.h"
  35. #endif
  36. #endif
  37. #ifdef XYLOGICS_BOOT
  38. #include "xylogics450.h"
  39. #endif
  40.  
  41. /*
  42.  * The controller configuration table.
  43.  */
  44. DevConfigController devCntrlr[] = {
  45.    /* Name     Address,  Addr space, ID, InitProc   IntrVector  IntrRoutine. */
  46. #ifdef SCSI3_BOOT
  47. #ifdef SCSI3_ONBOARD
  48.     { "SCSI3", 0x0FE12000,    DEV_OBIO,  0, DevSCSI3Init,26, DevSCSI3Intr },
  49. #else
  50.     { "SCSI3",  0x200000, DEV_VME_D16A24, 0, DevSCSI3Init, 64, DevSCSI3Intr },
  51. #endif
  52. #endif
  53. #ifdef SCSI0_BOOT
  54.     { "SCSI0",  0x200000, DEV_VME_D16A24, 0, DevSCSI0Init, 64, DevSCSI0Intr },
  55. #endif
  56. #ifdef XYLOGICS_BOOT
  57.     { "Xylogics450", 0xee40, DEV_VME_D16A16,     0, DevXylogics450Init,
  58. #endif
  59.  
  60. };
  61. int devNumConfigCntrlrs = sizeof(devCntrlr) / sizeof(DevConfigController);
  62.  
  63. /*
  64.  * Table of SCSI HBA types attached to this system.
  65.  */
  66.  
  67. ScsiDevice *((*devScsiAttachProcs[])()) = {
  68. #ifdef SCSI3_BOOT
  69.     DevSCSI3AttachDevice,        /* SCSI Controller type 0. */
  70. #endif
  71. #ifdef SCSI0_BOOT
  72.     DevSCSI0AttachDevice,        /* SCSI Controller type 1. */
  73. #endif
  74. };
  75. int devScsiNumHBATypes = sizeof(devScsiAttachProcs) / 
  76.              sizeof(devScsiAttachProcs[0]);
  77.  
  78. /*
  79.  * A list of disk devices that is used when probing for a root partition.
  80.  * The choices are:
  81.  * Drive 0 partition 0 of xylogics 450 controller 0.
  82.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI0 HBA 0.
  83.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI3 HBA 0. 
  84.  */
  85. Fs_Device devFsDefaultDiskPartitions[] = { 
  86. #ifdef XYLOGICS_BOOT
  87.     { -1, DEV_XYLOGICS, 0, (ClientData) NIL },    
  88. #endif
  89. #if defined(SCSI0_BOOT) || defined(SCSI3_BOOT)
  90.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, 0, 0, 0, 0, 0),
  91.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, 0, 0, 0, 0, 0),
  92.         (ClientData) NIL }, 
  93. #endif
  94. };
  95. int devNumDefaultDiskPartitions = sizeof(devFsDefaultDiskPartitions) / 
  96.               sizeof(Fs_Device);
  97.  
  98.  
  99.